Altough this is not very useful for single objects, performing this method on objects that handle children can become very handy. In this case, all the children (any maybe their children) are tested against udata and all matching objects will get the attribute set.
If you e.g. want to clear several string gadgets in your applciation at once, you simply give them the same MUIA_UserData and use
DoMethod(app,MUIM_SetUData,MyUDATA,MUIA_String_Contents,NULL);